package com.yangjie.common.dao.criteria;

import org.hibernate.criterion.Criterion;
import org.hibernate.criterion.Restrictions;

public class BetweenExpression extends AbstractCriteriaExpression{

	private Object minValue = null;
	private Object maxValue = null;
	public Object getMinValue() {
		return minValue;
	}
	public void setMinValue(Object minValue) {
		this.minValue = minValue;
	}
	public Object getMaxValue() {
		return maxValue;
	}
	public void setMaxValue(Object maxValue) {
		this.maxValue = maxValue;
	}
	
	public Criterion toCriterion() {
		return Restrictions.between(this.getField(), minValue, maxValue);
	}
}
